import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
import Newslist from '../views/newslist.vue'
import Newsdetail from '../views/newsdetail.vue'
import PhotoList from '../views/photo/list.vue'
import Info from '../views/photo/Info.vue'
import Member from '../views/member.vue'
import GoodsList from '../views/goods/list.vue'
import Goodsdetail from '../views/goods/detail.vue'
import Goodsdesc from '../views/goods/goodsdesc.vue'
import Goodscomments from '../views/goods/goodscomments'
import Search from '../views/search.vue'
Vue.use(VueRouter)

const routes = [{
  path: '/',
  redirect: '/home'
},
{
  path: '/home',
  component: Home
}, {
  path: '/newslist',
  component: Newslist
}, {
  path: '/newsdetail/:id',
  component: Newsdetail
}, {
  path: '/photo/list',
  component: PhotoList
}, {
  path: '/photo/Info/:id',
  component: Info
}, {
  path: '/member',
  component: Member
}, {
  path: '/goods/list',
  component: GoodsList
}, {
  path: '/goods/detail/:id',
  component: Goodsdetail
}, {
  path: '/goodsdesc/:id',
  component: Goodsdesc
}, {
  path: '/goodscomments/:id',
  component: Goodscomments
},
{
  path: '/search',
  component: Search
}
]

const router = new VueRouter({
  routes
})

export default router